﻿using BackupContracts.Sql;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace BackupContracts.Tasks
{
    public class MaintenanceTask : ModelBase
    {
        private string _Id;
        public string Id
        {
            get { return _Id; }
            set { SetField(ref _Id, value, () => Id); }
        }

        private string _Name;
        public string Name
        {
            get { return _Name; }
            set { SetField(ref _Name, value, () => Name); }
        }

        private bool _Enabled;
        public bool Enabled
        {
            get { return _Enabled; }
            set { SetField(ref _Enabled, value, () => Enabled); }
        }

        private DateTimeOffset? _LastExecution;
        public DateTimeOffset? LastExecution
        {
            get { return _LastExecution; }
            set { SetField(ref _LastExecution, value, () => LastExecution); }
        }

        private DateTimeOffset? _LastExecutionStart;
        public DateTimeOffset? LastExecutionStart
        {
            get { return _LastExecutionStart; }
            set { SetField(ref _LastExecutionStart, value, () => LastExecutionStart); }
        }

        public int RepeatEveryXMinutes { get; set; }
    }
}
